EN FR
EN FR


Section: New Results

Compilation techniques for synchronous languages

Participants : Marc Pouzet [contact] , Adrien Guatto, Léonard Gérard, Cédric Pasteur.

  • The generation of efficient sequential code for synchronous data-flow languages raises two intertwined issues: control and memory optimization. While the former has been extensively studied, for instance in the compilation of Lustre and SIGNAL, the latter has been only addressed in a restricted manner. Yet, memory optimization becomes a pressing issue when arrays are added to such languages, for example, SCADE 6 (http://www.esterel-technologies.com/products/scade-suite/ ). We have proposed a two-levels solution to the memory optimization problem. It combines a compile-time optimization algorithm, reminiscent of register allocation, paired with language annotations on the source given by the designer. Annotations express in-place modifications and control where allocation is performed. Moreover, they allow external functions performing in-place modifications to be imported safely. Soundness of annotations is guaranteed by a semilinear type system and additional scheduling constraints. A key feature is that annotations for well-typed programs do not change the semantics of the language: removing them may lead to a less efficient code but with the very same semantics.

    The method has been implemented in Heptagon , the compiler developed in the team of a Lustre-like synchronous language extended with hierarchical automata and arrays. Experiments show that the proposed approach removes most of the unnecessary array copies, resulting in faster code that uses less memory. This work has been presented at the ACM Intern. Conf. on Languages, Compilers and Tools for Embedded Systems (LCTES'12) in June 2012 and it has received the Best paper award.